<!DOCTYPE html>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ page language="java" contentType="text/html;  charset=utf-8"
	pageEncoding="utf-8"%>
<html lang="ko">
	<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    
    <title>Faeple</title>
    <!--[if lt IE 9]>
		<script src="/resources/js/html5shiv.js"></script>
		<script src="/resources/js/respond.min.js"></script>
    <![endif]-->
    <!--[if lt IE 10]>
    	<script src="/resources/js/placeholders.min.js"></script>
    	<style>
    		.itembox{opacity:1!important;}
    	</style>
    <![endif]-->
    <link rel="stylesheet" href="/resources/css/postModal.css?20150424">
	<link rel="stylesheet" href="/resources/css/postbox-viewer.css?20150419">
    <style type="text/css">
    	.signup-form{
    		width: 100%;
    		background-color: rgba(0, 0, 0, 0.85);
    		border-top: solid 1px black;
    		position: fixed;
    		box-shadow: 0 -2px 2px 0 rgba(0, 0, 0, 0.1),0 -1px 0 0 rgba(0, 0, 0, 0.1);
    		bottom: 0;
    		left: 0;
    		text-align: center;
    		padding: 25px 0;
    		z-index:1000;
    		-webkit-transform: translateY(300px);
			transform: translateY(300px);
			-webkit-transition:all 0.9s ease-in-out;
			-moz-transition:all 0.9s ease-in-out;
			-o-transition:all 0.9s ease-in-out;
			transition:all 0.9s ease-in-out;
    	}
    	.signup-form.open{
    		-webkit-transform: translateY(0);
			transform: translateY(0);
    	}
		#lastDataDis{
			text-align: center;
			width: 100%;
			height: 30px;
			position: relative;
			margin: 20px auto;
			display: none;
		}
		#lastDataDis h5{
			color: #808080;
			font-weight: bold;
		}
		#lastDataDis div{
			width: 100%;
			height: 2px;
			background-color: #ddd;
			border-bottom: 1px solid #ffffff;
		}
		#notLoadData{
			text-align: center;
			width: 100%;
			display: none;
		}
		.noData-Message{
			display: none;
			text-align: center;
			margin-top: 40px;
		}
    </style>
</head>

<body>
<div class="bar" role="bar"><div class="peg"></div></div><div class="n-spinner" role="n-spinner"><div class="spinner-icon"></div></div>
<div id="viewport">
<div id="page">
<!-- header -->
<%@ include file="head.jsp" %>
<!-- header -->
<!-- content -->
<c:if test="${empty userDto}">
<div class="signup-form">
	<!-- <button type="button" class="close" style="position: absolute; top:8px; right: 12px;" onclick="signFormHide()">×</button> -->
	<div class="container">
		<div style="margin-bottom:25px;"><h1><a href="/signup" style="color:#fff;text-decoration: none;"><spring:message code="view.signnup"/></a></h1></div>
		<div>
			<button type="button" class="btn btn-facebook" title="<spring:message code="view.sigunup.fb"/>" onclick="fb_login();" style="position: relative; width: 230px; border-radius:4px;"><span style="position: absolute; left:15px;"><i class="fa fa-facebook fa-lg"></i></span><spring:message code="view.sigunup.fb"/></button>
			<button type="button" class="btn btn-instagram" title="<spring:message code="sign.insta"/>" onclick="window.open('https://api.instagram.com/oauth/authorize/?client_id=1211a537d5c444c8a06c8d73bdc93bc6&redirect_uri=http://faeple.com/connectInstgram&response_type=code','Instagram','resizable=no width=500 height=380 scrollbars=yes')" style="position: relative; width: 230px; border-radius:4px; padding-right:0;"><img src="/resources/img/instagram-icon.png" width="20" height="20" style="position: absolute; left:15px;"><spring:message code="sign.insta"/></button>
			<p style="margin-top:10px;"><a href="/signup" style="color:#fff;font-weight:bold; text-decoration: none;"><spring:message code="view.sigunup.email"/></a></p>
			<div class="clearfix"></div>
		</div>
		<div class="clearfix"></div>
	</div>
</div>
</c:if>
<div style="margin-top:25px;padding:0 15px;">
	<div id="itemList"></div>
	<div id="lastDataDis"><div></div><h5><i class="glyphicon glyphicon-ok"></i>&nbsp;모두 불러왔습니다</h5></div>
	<div id="notLoadData">
		<p><i class="glyphicon glyphicon-remove" style="font-size:44px; color: #a2a2a2; text-shadow: 1px 1px 0px rgba(201,201,201,1);"></i>
		<h5>서버문제로 게시글을 불러올 수 없습니다</h5>
		<button onclick="location.reload(true)" class="btn btn-default btn-sm">다시시도</button>
	</div>
</div>

<!-- report dialog -->
<div class="modal fade" id="report-modal" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:1100;">
	<div class="modal-dialog" style="max-width: 350px;">
		<div class="modal-content">
			<form id="report-form" method="post">
			<input type="hidden" id="report-idx" name="report-idx">
			<input type="hidden" id="report-type" name="report-type">
			<div class="modal-header" style="border-bottom:0;padding-bottom:0;">
		        <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="font-size: 28px;">×</button>
		        <h4 class="modal-title">신고하기</h4>
			</div>
			<div class="modal-body">
				<div class="form-group">
					<label for="report-reason">이 게시물을 신고하는 이유가 무엇인가요?</label>
					<select class="selectpicker show-tick" id="report-reason" name="report-reason" title="선택" data-width="100%">
						<option value="spam">스팸 및 광고</option>
						<option value="improper">부적절한 주제</option>
						<option value="steal">도용 및 저작권 침해</option>
						<option value="speech">욕설 및 불편한 언어</option>
						<option value="porno">음란성</option>
						<option value="other">기타</option>
					</select>
				</div>
				<div class="form-group">
					<label for="report-opinion">추가의견</label>
					<textarea id="report-opinion" name="report-opinion" class="form-control" rows="3" cols="250" maxlength="200" style="resize:none;"></textarea>
				</div>
			</div>
			<div class="modal-footer" style="border-top:0;margin-top:0;padding:0 15px 15px 15px;">
				<button type="button" class="btn btn-primary btn-lg btn-block" onclick="report_submit(this);">보내기</button>
			</div>
			</form>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- report dialog -->
<div class="modal" id="post-modal" style="cursor:pointer; cursor:-webkit-zoom-out;">
	<button type="button" class="close" id="post-modal-close" title="닫기"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
	<div style="width: 1000px; margin: 25px auto; padding: 0; cursor: default;">
		<div id="post-viewer"></div>
	</div>
</div>
<div class="modal-backdrop in" id="post-backdrop" style="display: none; filter: alpha(opacity=85); opacity: .85; background-color: #d0d0d0;"></div>
<!-- share dialog -->
<div class="modal fade" id="share-modal" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog" style="max-width: 350px;">
		<div class="modal-content">
			<form id="report_form" method="post">
			<div class="modal-header" style="border-bottom:0;padding-bottom:0;">
		        <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="font-size: 28px;">×</button>
		        <h4>공유하기</h4>
			</div>
			<div class="modal-body">
				<p>공유할 사이트를 선택 :</p> 
				<ul class="list-inline share-list">
					<li><a href="javascript:fb_share();" title="페이스북으로 공유하기" style="display: block;"><img src="/resources/img/icon/share-facebook-icon.png" width="32px" height="32px"></a></li>
					<li><a href="javascript:twitter_share();" title="트위터로 공유하기" style="display: block;"><img src="/resources/img/icon/share-twitter-icon.png" width="32px" height="32px"></a></li>
					<li><a id="google-share" title="구글플러스로 공유하기" href="" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" style="display: block;"><img src="/resources/img/icon/share-googleplus-icon.png" width="32px" height="32px"></a></li>
					<li><a id="mail-share" href="" target="_blank" title="이메일로 공유하기"><img src="/resources/img/icon/share-email-icon.png" width="32px" height="32px"></a>
					<li><a id="kakao-link-btn" href="javascript:;" title="카카오로 공유하기" style="display: none;"><img width="34px;" height="34px;" src="http://dn.api1.kage.kakao.co.kr/14/dn/btqa9B90G1b/GESkkYjKCwJdYOkLvIBKZ0/o.jpg" style="margin-left:2px;" /></a></li>
				</ul>
				<div>
					<p>또는 포스트 링크 복사</p>
					<input type="text" id="input_urlCopy" class="form-control" readonly="readonly" value="" onclick="this.select();" style="background-color: #fff; cursor: text;">
				</div>
			</div>
			</form>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- share dialog -->
</div><!-- end page -->
<input type="hidden" id="share-url">
<input type="hidden" id="share-title">
<input type="hidden" id="share-image1">
<input type="hidden" id="share-content">
<%@ include file="commonScript.jsp" %>
</div><!-- end viewport -->
<div id="ieWar" style="position:absolute; background-color:#fff; display:none; text-align:center; left:50%; margin-left:-140px; top: 25%; z-index:999; width:280px; height:250px; border:1px red solid; padding:25px; " >
	<i class="glyphicon glyphicon-exclamation-sign" style="color:red; font-size:22pt;"></i><br><br>
	<p>현재 사용중인 익스플로러 버전으로는 패플을 이용하는대 어려움이 있습니다</p>
	<p>익스플로러 버전을 최소 9이상으로 업데이트 해주시거나 크롬을 설치해 이용해 주세요<p>
	<a href="#" onclick="$('#ieWar').fadeOut();">[닫기]</a><br>
</div>
<script src="/resources/js/modernizr.custom.js"></script>
<script src="/resources/js/masonry.pkgd.min.js"></script>
<script src="/resources/js/imagesloaded.pkgd.min.js"></script>
<script src="/resources/js/classie.js"></script>
<script src="/resources/js/AnimOnScroll.js"></script>
<script type="text/javascript">
	var index = 0;
	var hasPost = true;
	var member_idx = "${userDto.idx}";
	var member_id = "${userDto.id}";
	var member_name = "${userDto.name}";
	var member_profile = "${userDto.profileImage}";
	var viewType = window.location.pathname.replace("/","");
	var is_mobile = isMobile();
	var loading = true;
	
	function signFormHide(){
		$(".signup-form").removeClass("open");
		setTimeout(function(){$('.signup-form').remove();},600);
	}
	
	function getInternetExplorerVersion() {
		var rv = -1;
		if (navigator.appName == 'Microsoft Internet Explorer') {        
			var ua = navigator.userAgent;
			var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");        
			if (re.exec(ua) != null)            
			rv = parseFloat(RegExp.$1);    
		}    
		if(rv==8 || rv==7 || rv==6){
			$("#ieWar").show();
		}
	}

	window.onload = function() {
   		getInternetExplorerVersion();
   		loadEvent();
   		$("#report-reason").selectpicker();
   		$(".signup-form").addClass("open");
   	}
   	
   	function loadEvent(){
   		$.ajax({
   			type : "post"
		    , url : "/getEventPost"
		    , dataType : "json"
		    , async : false
		    , timeout : 5000
		    , error : function(){
		    }
		    , success : function(response) {
		    	var html = "";
		    	for(var i=0;i<response.length;i++){
		    		var likeBtnStyle = "";
	    			var comment = "";
	    			if(response[i].likeState == "like"){ likeBtnStyle = "style='color: #cc2e35;'"; }
	    			if(response[i].comment_cnt != 0){
	    				comment += "<div style='width: 93%; margin: 8px auto; border-bottom :1px solid #f3f3f3;'></div><div class='comment-list'>";
	    				for(var k=0;k<response[i].comment.length;k++){
	    					comment += "<div class='comment'><div title='"+response[i].comment[k].author+"' class='comment-profile'><a href='/"+response[i].comment[k].member_id+"'><img src='/resources/upload/profile/thumbnail/"+response[i].comment[k].profileImage+"'></a></div><div class='comment-right' title='"+response[i].comment[k].create_date+"'><div class='comment-author'><a href='/"+response[i].comment[k].member_id+"'>"+response[i].comment[k].author+"</a></div><div class='comment-content'>"+parseContent(response[i].comment[k].content).parseEmoji()+"</div></div></div>";
    					}
	    				comment += "</div>";
	    			}
	    			html += "<div class='itembox' data-idx='"+response[i].idx+"'><div class='item'><div class='item-image'><div class='item-function'><button type='button' class='likeBtn' title='좋아요' onclick='like(this,"+response[i].idx+","+response[i].member_idx+",\""+response[i].image1+"\",\""+response[i].url+"\")'><i class='fa fa-heart' "+likeBtnStyle+"></i></button><button type='button' title='공유하기' onclick='post_share(\""+shareParse(response[i].content)+"\", \""+shareParse(response[i].title)+"\", \""+response[i].image1+"\", \""+response[i].url+"\");'><i class='fa fa-share'></i></button></div><a href='/p/"+response[i].url+"' data-target='post' style='display: block;'><img src='/resources/upload/post/thumbnail/"+response[i].image1+"'></a></div><div class='item-profile'><div class='profile-img' data-memidx='"+response[i].member_idx+"'><a href='/"+response[i].member_id+"'><img src='/resources/upload/profile/thumbnail/"+response[i].profileImage+"'></a></div><div class='profile-info'><p class='profile-name'><a href='/"+response[i].member_id+"'>"+response[i].author+"</a></p><p class='profile-time'>"+timeleft(response[i].create_date)+"</p></div></div><div class='item-content'>"+parseContent(response[i].content.parseEmoji())+"</div><div class='item-info'><p style='float:left;'><i class='fa fa-heart'></i>&nbsp;<span class='like_cnt'>"+response[i].like_cnt+"</span><i class='fa fa-comment'></i>&nbsp;<span class='comment_cnt'>"+response[i].comment_cnt+"</span></p><p style='float:right; cursor:pointer;' title='신고하기' onclick='report("+response[i].idx+")'><i class='fa fa-flag'></i></p></div><div class='clearfix'></div>"+comment+"</div></div>";
	    		}
		    	$("#itemList").append(html);
		    }
		    , complete : function() { loadPost(); }
   		});
   	}
   	
   	/* roading post */
   	function loadPost(){
   		loading = false;
   		var data = "index="+index+"&viewType="+viewType+"&size=25";
   		$.ajax({
   			type : "post"
		    , url : "/loadPost"
		    , data : data
		    , dataType : "json"
		    , timeout : 5000
		    , error : function(request,status,error) {
		    	$("#notLoadData").show();
		    }
		    , success : function(response) {
		    	if(response == "" && index == 0){
		    		$("#itemList").html("<center><p><i class='fa fa-search-minus' style='font-size:45px; color: #7a7a7a;'></i><br><h4 class='nanum' style='font-weight: bold; color:#3A404C;'>등록된 포스트가 없습니다</h4></center>");
		    		hasPost = false;
		    		return false;
		    	}else{
		    		if(typeof response.length == "undefined" && index == 0){
		    			hasPost = false;
		    			if(response.result == 0){
		    				$("#follow_notData").show();
		    				hasPost = false;
		    				return false;
		    			}else{
		    				$("#not_follow").show();
		    				return false;
		    			}
		    		}else{
		    			if(response != ""){
		    				var html = "";
	 			    		for(var i=0;i<response.length;i++){
	 			    			var likeBtnStyle = "";
	 			    			var sellIcon = "";
	 			    			var comment = "";
	 			    			if(response[i].likeState == "like"){ likeBtnStyle = "style='color: #cc2e35;'"; }
	 			    			if(response[i].group_type == "seller" && response[i].source != ""){ sellIcon = "<div class='sell-icon'><i class='ion-bag'></i></div>"; }
	 			    			if(response[i].comment_cnt != 0){
	 			    				comment += "<div style='width: 93%; margin: 8px auto; border-bottom :1px solid #f3f3f3;'></div><div class='comment-list'>";
	 			    				for(var k=0;k<response[i].comment.length;k++){
	 			    					comment += "<div class='comment'><div title='"+response[i].comment[k].author+"' class='comment-profile'><a href='/"+response[i].comment[k].member_id+"'><img src='/resources/upload/profile/thumbnail/"+response[i].comment[k].profileImage+"'></a></div><div class='comment-right' title='"+response[i].comment[k].create_date+"'><div class='comment-author'><a href='/"+response[i].comment[k].member_id+"'>"+response[i].comment[k].author+"</a></div><div class='comment-content'>"+parseContent(response[i].comment[k].content).parseEmoji()+"</div></div></div>";
 			    					}
	 			    				comment += "</div>";
	 			    			}
	 			    			html += "<div class='itembox' data-idx='"+response[i].idx+"'><div class='item'><div class='item-image'><div class='item-function'><button type='button' class='likeBtn' title='좋아요' onclick='like(this,"+response[i].idx+","+response[i].member_idx+",\""+response[i].image1+"\",\""+response[i].url+"\")'><i class='fa fa-heart' "+likeBtnStyle+"></i></button><button type='button' title='공유하기' onclick='post_share(\""+shareParse(response[i].content)+"\", \""+shareParse(response[i].title)+"\", \""+response[i].image1+"\", \""+response[i].url+"\");'><i class='fa fa-share'></i></button></div><a href='/p/"+response[i].url+"' data-target='post' style='display: block;'><img src='/resources/upload/post/thumbnail/"+response[i].image1+"'>"+sellIcon+"</a></div><div class='item-profile'><div class='profile-img' data-memidx='"+response[i].member_idx+"'><a href='/"+response[i].member_id+"'><img src='/resources/upload/profile/thumbnail/"+response[i].profileImage+"'></a></div><div class='profile-info'><p class='profile-name'><a href='/"+response[i].member_id+"'>"+response[i].author+"</a></p><p class='profile-time'>"+timeleft(response[i].create_date)+"</p></div></div><div class='item-content'>"+parseContent(response[i].content.parseEmoji())+"</div><div class='item-info'><p style='float:left;'><i class='fa fa-heart'></i>&nbsp;<span class='like_cnt'>"+response[i].like_cnt+"</span><i class='fa fa-comment'></i>&nbsp;<span class='comment_cnt'>"+response[i].comment_cnt+"</span></p><p style='float:right; cursor:pointer;' title='신고하기' onclick='report("+response[i].idx+")'><i class='fa fa-flag'></i></p></div><div class='clearfix'></div>"+comment+"</div></div>";
	 			    		}
	 			    		$("#itemList").append(html);
	 			    		new AnimOnScroll(document.getElementById("itemList"), {
	 			    			minDuration : 0.4,
	 			    			maxDuration : 0.7,
	 			    			viewportFactor : 0.2
	 			    		});
 			    		}else{
 			    			$("#lastDataDis").show();
 			    			hasPost = false;
 			    		}
		    		}
		    	}
		    	$("#notLoadData").hide();
		    }
		    , beforeSend: function() {
		    	$("#ajax-spinner").show();
		    }
		    , complete: function() {
		    	$("#ajax-spinner").hide();
		    	loading = true;
		    }
		});
   	}
   	
   	function like(button, post_idx, author_idx, refer_img, refer_url){
        if (!member_idx) {
            alertShow("danger", "로그인이 필요합니다", 2000);
        } else {
        	var data = "post_idx="+post_idx+"&author_idx="+author_idx+"&refer_img="+refer_img+"&refer_url="+refer_url;
        	$(button).html("<img src='/resources/img/default-btn-loading.gif'>");
        	setTimeout(function(){
       			$.ajax({
	                type: "post",
	                url: "/addLike",
	                data: data,
	                dataType: "text",
	                timeout: 5000,
	                error: function () {
	                    alertShow("danger", "다시 시도해주세요", 2000);
	                },
	                success: function (response) {
	                    if (response == "unlike") {
	                    	$(button).html("<i class='fa fa-heart'></i>")
	                    	.parent().parent().parent().children("div.item-info").find("span.like_cnt").html(parseInt($(button).parent().parent().parent().children("div.item-info").find("span.like_cnt").html())-1);
	                    } else if (response == "execute") {
	                    	$(button).html("<i class='fa fa-heart' style='color: #cc2e35;'></i>")
	                    	.parent().parent().parent().children("div.item-info").find("span.like_cnt").html(parseInt($(button).parent().parent().parent().children("div.item-info").find("span.like_cnt").html())+1);
	                    } else {
	                    	$(button).html("<i class='fa fa-heart'></i>");
	                        alert('잘못된 접근입니다');
	                    }
	                }
	            });
        	}, 500);
        }
    }
   	
   	function report(idx, type){
   		if(type=="comment"){
			$("#report-reason").prev().html("이 댓글을 신고하는 이유가 무엇인가요?");
			$("#report-type").val("comment");
		}else{
			$("#report-reason").prev().html("이 게시물을 신고하는 이유가 무엇인가요?");
			$("#report-type").val("post");
		}
   		$("#report-idx").val(idx);
   		$("#report-modal").modal("show");
   	}
   	
   	$(window).scroll(function(event){
   		if(hasPost && loading){
   			if($(window).scrollTop() > ($(document).height()-$(window).height()-350)){
    			NProgress.set(0.0);
   	    		index += 25;
   	    		loadPost();
       		}
   		}
   	});
   	
   	function post_share(content, title, image1, url){
   		$("#input_urlCopy").val(location.host+"/p/"+url);
   		$("#google-share").attr("href", "https://plus.google.com/share?url={"+location.host+"/p/"+url+"}");
   		$("#mail-share").attr("href", "mailto:?subject="+title+"&body="+content+"%0D%0AURL : "+location.host+"/p/"+url);
   		$("#share-url").val(location.host+"/p/"+url);
   		$("#share-title").val(title);
   		$("#share-image1").val(location.host+"/resources/upload/post/thumbnail/"+image1);
   		$("#share-content").val(content);
   		if(isMobile()){
   		    $("#kakao-link-btn").show();
   		}
   		$("#share-modal").modal("show");
   		Kakao.Link.createTalkLinkButton({
   	   		container: '#kakao-link-btn',
   	   		label: 'Faeple on Style : '+title,
   	   		image: {
   	   			src: location.host+"/resources/upload/post/thumbnail/"+image1,
   	   			width: '300',
   	   			height: '200'
   	   		},
   	   		webButton: {
   	   			text: 'Faeple.com 이동',
   	   			url: location.host+"/p/"+url
   	   		}
   	   	});
   	}
   	
   	function fb_share(){
   		var content = $("#share-content").val();
   		var url = $("#share-url").val();
   		var obj = {
   			method: "feed",
   			link: url,
   			picture: $("#share-image1").val(),
   			name: $("#share-title").val(),
   			caption: url,
   			description: content
   		};
   		
   		function callback(response){
   			if(response && response.post_id){
   				$("#share-modal").modal("hide");
   			}
   		}
   		FB.ui(obj, callback);
   	}
   	function twitter_share(){
   		var content = "Faeple on Style : "+ $("#share-url").val();
   		var url = $("#share-url").val();
   		var link = "https://twitter.com/intent/tweet?text="+content+"&url="+url;
   		window.open(link,'트위터로 공유하기','scrollbars=no,toolbar=no,resizable=yes,width=600,height=260');
   	}
   	
   	function report_submit(obj){
		$(obj).html("전송중...").attr("disabled", "disabled");
		setTimeout(function(){
			$.ajax({
				type : "post"
			    , url : "/submitReport"
			    , dataType : "text"
			    , data : $("#report-form").serialize()
			    , timeout : 5000
			  	, error : function() {
			  		alertShow("danger", "다시 시도해주세요" ,2000);
			  		$(obj).html("보내기").removeAttr("disabled");
			    }
			    , success : function(response) {
			    	if(response){
			    		alertShow("success", "신고되었습니다" ,2000);
			    	}else{
			    		alertShow("danger", "다시 시도해주세요" ,2000);
			    	}
			    	$("#report-modal").modal("hide");
			    }
			 	, complete: function(){
			 		$(obj).html("보내기").removeAttr("disabled");
			 		$("#report-form")[0].reset();
			 	}
			});
		}, 800);
   	}
</script>
<script type="text/javascript" src="/resources/js/swipe.js"></script>
<script type="text/javascript" src="/resources/js/postModal.js?20150424"></script>
</body>
</html>